Skip to content

consensus/clique: implement getSignerForBlock#22987

Merged
karalabe merged 7 commits into
ethereum:masterfrom
MariusVanDerWijden:clique-get-signer
Jul 13, 2021
Merged

consensus/clique: implement getSignerForBlock#22987
karalabe merged 7 commits into
ethereum:masterfrom
MariusVanDerWijden:clique-get-signer

Conversation

@MariusVanDerWijden
Copy link
Copy Markdown
Member

Prints the signer for a certain block

@MariusVanDerWijden
Copy link
Copy Markdown
Member Author

@holiman suggested to have getSealerForBlockRlp

@karalabe
Copy link
Copy Markdown
Member

karalabe commented Jun 2, 2021

Could we do getSigner (i.e. no block) and allow specifying either a number a hash (these 2 are easy, we have a rpc.hashOrNumber type) and also perhaps an RLP hex dump (block will always be >> than 32byte hash, so no clash). I think it would be useful to multiplex the various calls one might make without having to remember 3 method names. Just my 2c.

Comment thread consensus/clique/api.go Outdated
@MariusVanDerWijden
Copy link
Copy Markdown
Member Author

So 890673a implements getSignerForBlock (doxxed and pretty decently)
While 168c82d implements getSignerin a way that lets us take the RLP too. I haven't tested the second one yet. I believe that it is not working yet due to the inputBlockNumberFormatterin web3.js

Copy link
Copy Markdown
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a really useful api endpoint!

Comment thread consensus/clique/api.go Outdated
Comment thread internal/web3ext/web3ext.go Outdated
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
@fjl fjl changed the title clique: implement getSignerForBlock consensus/clique: implement getSignerForBlock Jul 13, 2021
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
Comment thread consensus/clique/api.go Outdated
Copy link
Copy Markdown
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@karalabe karalabe added this to the 1.10.5 milestone Jul 13, 2021
@karalabe karalabe merged commit b9e6e43 into ethereum:master Jul 13, 2021
sidhujag pushed a commit to sidhujag/go-ethereum that referenced this pull request Jul 28, 2021
* clique: implement getSignerForBlock

* consensus/clique: use blockNrOrHash in getSignerForBlock

* consensus/clique: implement getSigner

* consensus/clique: fixed rlp decoding

* consensus/clique: use Author instead of getSigner

* consensus/clique: nit nit nit

* consensus/clique: nit nit nit
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
* clique: implement getSignerForBlock

* consensus/clique: use blockNrOrHash in getSignerForBlock

* consensus/clique: implement getSigner

* consensus/clique: fixed rlp decoding

* consensus/clique: use Author instead of getSigner

* consensus/clique: nit nit nit

* consensus/clique: nit nit nit
@MariusVanDerWijden MariusVanDerWijden deleted the clique-get-signer branch November 30, 2021 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants